package com.geek.service;

import com.geek.bean.BaseRespVo;
import com.geek.bean.data.CartCheckoutData;
import com.geek.bean.data.CartIndexData;
import com.geek.bean.data.RequestOrderSubmitData;
import com.geek.bean.data.ResponseCheckoutData;
import com.geek.bean.vo.CartAddVO;
import com.geek.bean.vo.CartCheckedVO;
import com.geek.bean.vo.CartUpdateVO;
import com.geek.model.MarketCart;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * @author 小豪
 * @version 1.0
 * @description
 * @date 2024-06-17 16:45
 */
public interface CartService {
    long getGoodsCount(Integer userId);

    CartIndexData index(Integer userId);

    BaseRespVo add(Integer userId, CartAddVO cartAddVO);


    CartIndexData checked(Integer userId, CartCheckedVO checkedVO);

    Integer fastAdd(Integer userId, Integer goodsId, Short number, Integer productId);

    CartCheckoutData checkout(Integer userId, Integer cartId, Integer addressId, Integer couponId, Integer userCouponId, Integer grouponRuleId, BigDecimal freightMin, BigDecimal freightValue);

    CartCheckoutData cartCheckoutFastAdd(Integer userId, Integer cartId, Integer addressId, Integer couponId, Integer userCouponId, Integer grouponRuleId, BigDecimal freightMin, BigDecimal freightValue);
    ResponseCheckoutData cartCheckout(int userId, RequestOrderSubmitData submitData, Integer freightMin, Integer freightValue);

    void deleteByUserId(Integer userId, List<Integer> productIds);

    void update(Integer userId, CartUpdateVO updateVO);
    List<MarketCart> findCheckedByUserId(int userId);
    MarketCart findById(Integer cartId);
    List<MarketCart> findListById(Integer cartId);
    void deleteByCartId(Integer cartId);


    void deleteByListIds(List<MarketCart> cartList);
    ResponseCheckoutData cartCountByFastadd(int userId, RequestOrderSubmitData submitData, Integer freightMin, Integer freightValue);

}
